package Exam.controller;

import Exam.model.RegisterModel;
import Exam.pojo.User;
import Exam.util.JDBCUtil;


public class RegisterController {
    private RegisterModel model = new RegisterModel();

    public boolean register(User user) {

        if (!model.hasThisName(user.getUsername())) {
            JDBCUtil.closeConn();
            return model.register(user);
        }

        return false;
    }
}
